home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000085_icon-group-sender_Wed Oct 23 13:00:51 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g9NJxew14318
for icon-group-addresses; Wed, 23 Oct 2002 12:59:40 -0700 (MST)
Message-Id: <200210231959.g9NJxew14318@baskerville.CS.Arizona.EDU>
From: "Paul W. Abrahams" <abrahams@acm.org>
To: icon2002@OptOnLine.net
Subject: move_corresponding
Date: Wed, 23 Oct 2002 14:57:43 -0400
Cc: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
On Wednesday 23 October 2002 11:43 am, Steve Hunter wrote:
> record r1(a,b,c,d)
>
> procedure main()
> local x1
> x1:=r1("one","two","three","four")
> fld_nm := "a"; x1[fld_nm]:="pete"
> write(name(x1.a),":",image(x1.a),":",x1.a)
>
> end
I hadn't realized that a record can be subscripted by a field name as well as
by a position (but of course it can). I found a kludgy workaround for the
problem, by building tables that map field names to their positions, but this
solution is far better.
Paul